package org.sds.webcmd.listeners;

import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.servlet.GuiceServletContextListener;
import org.apache.log4j.Logger;
import org.sds.webcmd.modules.WebCmdModule;

import javax.servlet.ServletContextEvent;

/**
 * Copyright 2011 Tripwire, Inc. All Rights Reserved.
 * ver 1.0 Jun 14, 2011 Dungtv8
 */
public class WebCmdGuiceListener extends GuiceServletContextListener {
    private static Injector INJECTOR = Guice.createInjector(new WebCmdModule());
    private final Logger LOGGER = Logger.getLogger(getClass().getName());

    public WebCmdGuiceListener() {
        super();
    }

    @Override
    protected Injector getInjector() {
        return INJECTOR;
    }

    @Override
    public void contextInitialized(ServletContextEvent servletContextEvent) {
        super.contextInitialized(servletContextEvent);
    }

}
